import App from './App';
import store from '@/store';

// Api函数polyfill（目前为实验版本，如不需要，可删除！）';
import Polyfill from './polyfill/polyfill';
Polyfill.init();

// 全局mixins，用于实现setData等功能，请勿删除！';
import Mixin from './polyfill/mixins';
// #ifndef VUE3
import Vue from 'vue';
Vue.prototype.$artist = function() {
	// #ifdef APP-PLUS
	this.$store.commit('get_artist_status', true)
	return true;
	// #endif
}
Vue.mixin(Mixin);
Vue.prototype.$store = store;
Vue.config.productionTip = false;
App.mpType = 'app';
if (uni.getSystemInfoSync().platform === "devtools") {
	console.log = () => {}
	console.warn = () => {}
	console.error = () => {}
}
if (process.env.NODE_ENV === 'production') {
	console.log = () => {}
	console.warn = () => {}
	console.error = () => {}
}
const app = new Vue({
	...App
});
app.$mount();
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue';
export function createApp() {
	const app = createSSRApp(App);
	app.mixin(Mixin);
	return {
		app
		store
	};
}
// #endif
